/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

#root {
  height: 100%;
}

/* Layout相关样式 - 修复侧边栏缩放边框问题 */
.ant-layout {
  background: #f5f5f5 !important;
}

.ant-layout-sider {
  background: #ffffff !important;
  border-right: none !important;
  box-shadow: 2px 0 8px 0 rgba(24, 144, 255, 0.08) !important;
}

.ant-layout-sider-collapsed .ant-layout-sider-children {
  overflow: hidden !important;
}

.ant-layout-content {
  background: transparent !important;
}

/* 侧边栏过渡动画优化 */
.ant-layout-sider {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ant-layout-sider-trigger {
  display: none !important;
}

/* 菜单样式优化 */
.ant-menu-light {
  background: transparent !important;
  border-right: none !important;
}

.ant-menu-light .ant-menu-item {
  margin: 4px 12px !important;
  border-radius: 8px !important;
  height: 40px !important;
  line-height: 40px !important;
  transition: all 0.2s ease !important;
}

.ant-menu-light .ant-menu-item:hover {
  background-color: #e6f7ff !important;
  color: #1890ff !important;
}

.ant-menu-light .ant-menu-item-selected {
  background-color: #e6f7ff !important;
  color: #1890ff !important;
  font-weight: 500 !important;
}

.ant-menu-light .ant-menu-item-selected .anticon {
  color: #1890ff !important;
}

.ant-menu-light .ant-menu-item-selected::after {
  display: none !important;
}

.ant-menu-light .ant-menu-item .anticon {
  color: #8c8c8c !important;
  transition: color 0.2s ease !important;
}

.ant-menu-light .ant-menu-item:hover .anticon {
  color: #1890ff !important;
}

/* 头部样式优化 */
.ant-layout-header {
  padding: 0 24px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e8e8e8 !important;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08) !important;
}

/* 内容区域边框修复 */
.ant-layout-content > div {
  border: 1px solid #f0f0f0 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.2s ease !important;
}

/* 防止边框闪烁 */
.ant-layout-content > div:hover {
  border-color: #e8e8e8 !important;
}

/* 简洁的滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式优化 */
@media (max-width: 768px) {
  .ant-layout-sider-children {
    overflow-x: hidden;
  }
  
  .ant-layout-header {
    padding: 0 12px !important;
  }
  
  .ant-layout-content {
    margin: 16px 8px !important;
    padding: 16px !important;
  }
  
  .ant-layout-content > div {
    margin: 0 !important;
    border-radius: 8px !important;
  }
}

@media (max-width: 576px) {
  .ant-layout-header {
    padding: 0 8px !important;
  }
  
  .ant-layout-content {
    margin: 12px 4px !important;
    padding: 12px !important;
  }
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

/* Modal 样式优化 */
.ant-modal {
  border-radius: 12px !important;
}

.ant-modal-content {
  border-radius: 12px !important;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) !important;
}

.ant-modal-header {
  border-radius: 12px 12px 0 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 16px 24px !important;
}

.ant-modal-title {
  color: #1890ff !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.ant-modal-body {
  padding: 24px !important;
  background: #ffffff !important;
}

.ant-modal-footer {
  border-top: 1px solid #f0f0f0 !important;
  padding: 16px 24px !important;
  background: #fafafa !important;
  border-radius: 0 0 12px 12px !important;
}

/* 详情Modal内容样式 */
.ant-modal-body h4 {
  color: #1890ff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 16px !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #e6f7ff !important;
  position: relative !important;
}

.ant-modal-body h4::before {
  content: '' !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 0 !important;
  width: 30px !important;
  height: 2px !important;
  background: #1890ff !important;
}

/* Descriptions 组件样式优化 */
.ant-descriptions {
  background: #fafafa !important;
  border-radius: 8px !important;
  padding: 16px !important;
}

.ant-descriptions-bordered .ant-descriptions-item-label {
  background: #f0f9ff !important;
  color: #1890ff !important;
  font-weight: 500 !important;
}

.ant-descriptions-bordered .ant-descriptions-item-content {
  background: #ffffff !important;
}

.ant-descriptions-item-label {
  color: #595959 !important;
  font-weight: 500 !important;
}

/* List 组件样式优化 */
.ant-modal-body .ant-list {
  background: #fafafa !important;
  border-radius: 8px !important;
  padding: 12px !important;
}

.ant-modal-body .ant-list-item {
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 12px 0 !important;
}

.ant-modal-body .ant-list-item:last-child {
  border-bottom: none !important;
}

/* Tree 组件样式优化 */
.ant-modal-body .ant-tree {
  background: #fafafa !important;
  border-radius: 8px !important;
  padding: 12px !important;
  border: 1px solid #f0f0f0 !important;
}

/* 页面中的树形组件样式 - 去掉背景色 */
.ant-tree {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.ant-tree .ant-tree-node-content-wrapper {
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

.ant-tree .ant-tree-node-content-wrapper:hover {
  background-color: #f5f5f5 !important;
}

.ant-tree .ant-tree-node-selected .ant-tree-node-content-wrapper {
  background-color: #e6f7ff !important;
  color: #1890ff !important;
}

.ant-tree .ant-tree-switcher {
  color: #8c8c8c !important;
}

.ant-tree .ant-tree-switcher:hover {
  color: #1890ff !important;
}

/* Tag 样式优化 */
.ant-modal-body .ant-tag {
  border-radius: 6px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* 统一 Modal 中的信息展示样式 - 与编辑表单保持一致 */
.ant-modal-body .ant-row {
  margin-bottom: 0 !important;
}

.ant-modal-body .ant-col > div {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  margin-bottom: 16px !important;
  transition: none !important;
  position: static !important;
}

.ant-modal-body .ant-col > div:hover {
  border-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

.ant-modal-body .ant-col > div .ant-typography {
  margin-bottom: 4px !important;
}

.ant-modal-body .ant-col > div .ant-typography strong {
  color: #262626 !important;
  font-weight: 600 !important;
  display: inline !important;
  margin-bottom: 0 !important;
  font-size: 14px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin-right: 8px !important;
}

.ant-modal-body .ant-col > div .ant-typography:not(strong) {
  color: #595959 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
}

/* 权限信息区域样式 - 保持简洁 */
.ant-modal-body > div > div:last-child {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  margin-top: 24px !important;
}

.ant-modal-body > div > div:last-child > div {
  margin-bottom: 16px !important;
}

.ant-modal-body > div > div:last-child > div:last-child {
  margin-bottom: 0 !important;
}

.ant-modal-body > div > div:last-child .ant-typography strong {
  color: #262626 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  display: inline !important;
  margin-bottom: 0 !important;
  margin-right: 8px !important;
}

.ant-modal-body > div > div:last-child .ant-tag {
  margin: 2px 4px 2px 0 !important;
}

/* 关闭按钮样式 */
.ant-modal-close {
  color: #8c8c8c !important;
  transition: all 0.2s ease !important;
}

.ant-modal-close:hover {
  color: #1890ff !important;
  background-color: #f0f9ff !important;
}

/* Form 在 Modal 中的样式优化 */
.ant-modal-body .ant-form {
  background: transparent !important;
}

.ant-modal-body .ant-form-item-label > label {
  color: #262626 !important;
  font-weight: 500 !important;
}

.ant-modal-body .ant-input,
.ant-modal-body .ant-select-selector,
.ant-modal-body .ant-input-number,
.ant-modal-body .ant-input-affix-wrapper {
  border-radius: 6px !important;
  border: 1px solid #d9d9d9 !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease !important;
}

.ant-modal-body .ant-input:hover,
.ant-modal-body .ant-select-selector:hover,
.ant-modal-body .ant-input-number:hover,
.ant-modal-body .ant-input-affix-wrapper:hover {
  border-color: #40a9ff !important;
}

.ant-modal-body .ant-input:focus,
.ant-modal-body .ant-select-focused .ant-select-selector,
.ant-modal-body .ant-input-number:focus,
.ant-modal-body .ant-input-affix-wrapper:focus,
.ant-modal-body .ant-input-affix-wrapper-focused {
  border-color: #1890ff !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
  outline: none !important;
}

/* TextArea 样式 */
.ant-modal-body .ant-input {
  resize: none !important;
}

/* Select 下拉框样式 */
.ant-modal-body .ant-select-dropdown {
  border-radius: 6px !important;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08) !important;
}

/* Select 组件选择项样式优化 */
.ant-modal-body .ant-select-selection-overflow-item {
  background: transparent !important;
}

 